package homework7.soso.entity;

import homework7.soso.service.impl.ServicePackage;
import homework7.soso.untils.CardUtil;
import homework7.soso.untils.NumberUtil;

import java.io.Serializable;

/**
 * @author fengq
 * @describe 移动卡的看基本信息
 */
public class MobileCard implements Serializable {
    private static  final long serialVersionUID=1L;
    /**
     * 卡号
     */
    private String cardNumber;
    /**
     * 用户名
     */
    private String userName;
    /**
     * 密码
     */
    private String password;
    /**
     * 服务套餐
     */
    private ServicePackage servicePackage;
    /**
     *  当月消费金额
     */
    private double consumeAmount;
    /**
     * 账户余额
     */
    private double money;
    /**
     * 当月实际通话时长
     */
    private int realTalkTime;
    /**
     * 当月实际发送短信条数
     */
    private int realSMSCount;
    /**
     * 当月实际上网流量
     */
    private int realFlow;

    public MobileCard() {
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public ServicePackage getServicePackage() {
        return servicePackage;
    }

    public void setServicePackage(ServicePackage servicePackage) {
        this.servicePackage = servicePackage;
    }

    public double getConsumeAmount() {
        return consumeAmount;
    }

    public void setConsumeAmount(double consumeAmount) {
        this.consumeAmount = consumeAmount;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public int getRealTalkTime() {
        return realTalkTime;
    }

    public void setRealTalkTime(int realTalkTime) {
        this.realTalkTime = realTalkTime;
    }

    public int getRealSMSCount() {
        return realSMSCount;
    }

    public void setRealSMSCount(int realSMSCount) {
        this.realSMSCount = realSMSCount;
    }

    public int getRealFlow() {
        return realFlow;
    }

    public void setRealFlow(int realFlow) {
        this.realFlow = realFlow;
    }

    public void showMeg() {
        System.out.println("******本月账单查询**********");
        System.out.println("您的卡号：" + getCardNumber() + "，当月账单");
        System.out.println("套餐资费:" + NumberUtil.dataFormat(getServicePackage().price) + "元");
        System.out.println("合计:" + NumberUtil.dataFormat(getConsumeAmount()) + "元");
        System.out.println("账户余额:" + NumberUtil.dataFormat(getMoney()) + "元");
    }
}
